package asteroids.model.programs.Expression;
import asteroids.model.Ship;

/**
* 
* @version 0.3
* @author  Tandan Sunil, Van Deun Luca
*
*/
public class GetDirectionMethod extends SelfMethodExpression {

	public GetDirectionMethod(int line, int column) {
		super(line, column);
	}

	@Override
	public double getValue() {
		return ((Ship) sl.getEntity()).getAngle();
	}


	private SelfLiteral sl;
	public void setSelfLiteral(SelfLiteral sl){
		if(sl != null)
			this.sl = sl;
	}

}
